package com.wfcm.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wfcm.dao.WfChapterRecordDao;
import com.wfcm.datasource.DataSourceContextHolder;
import com.wfcm.datasource.DynamicDataSource;
import com.wfcm.datasource.DynamicDataSourceAnnotation;
import com.wfcm.entity.WfChapterRecordEntity;
import com.wfcm.service.WfChapterRecordService;



@Service("wfChapterRecordService")
@DynamicDataSourceAnnotation
public class WfChapterRecordServiceImpl implements WfChapterRecordService {
	@Autowired
	private WfChapterRecordDao wfChapterRecordDao;
	
	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_play)
	public WfChapterRecordEntity queryObject(Integer id){
		return wfChapterRecordDao.queryObject(id);
	}

	@Override
	public List<WfChapterRecordEntity> queryList(Map<String, Object> map){
		return wfChapterRecordDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return wfChapterRecordDao.queryTotal(map);
	}
	
	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_play)
	public void save(WfChapterRecordEntity wfChapterRecord){
		wfChapterRecordDao.save(wfChapterRecord);
	}
	
	@Override
	@DynamicDataSourceAnnotation(dataSource = DataSourceContextHolder.dataSource_play)
	public void update(WfChapterRecordEntity wfChapterRecord){
		wfChapterRecordDao.update(wfChapterRecord);
	}
	
	@Override
	public void delete(Integer id){
		wfChapterRecordDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		wfChapterRecordDao.deleteBatch(ids);
	}
	
}
